Re: [PORTS] Re: 64-bit int (was backend cache...)
От | Herouth Maoz |
---|---|
Тема | Re: [PORTS] Re: 64-bit int (was backend cache...) |
Дата | |
Msg-id | l03110707b2a2a1e617ca@[147.233.159.109] обсуждение исходный текст |
Список | pgsql-ports |
At 17:50 +0200 on 17/12/98, Thomas G. Lockhart wrote: > Yes, it seems that it should be. Please send your src/config.log so we > can see what it determined. You might also check that the libc used for > your little test is the same libc used for Postgres linking, just in > case you are getting a different printf. Ah, the config.log reveals some interesting stuff... Don't Postgres sources include stdlib.h? I think there are other tests that fail because they expect certain symbols to be defined, but don't include the proper files. For example, the F_SETLK test fails, not because F_SETLK is missing, but because SEEK_SET is missing... Also, apparently, one gets a warning if main is not explicitly declared void... << Snippet from src/config.log >> configure:3858: checking whether 'long int' is 64 bits configure:3898: /l5/lang/SUNWspro/bin/cc -o conftest -Xa -v -D__sparc__ -D__sun__ -DDISABLE_COMPLEX_MACRO conftest.c -lgen -lcrypt -lnsl -lsocket -ldl -lm -ltermcap -lcurses 1>&5 "configure", line 3882: warning: implicitly declaring function to return int: strcmp() "configure", line 3894: warning: implicitly declaring function to return int: exit() "configure", line 3895: warning: Function has no return statement : main configure: failed program was: #line 3863 "configure" #include "confdefs.h" #include <stdio.h> typedef long int int64; #define INT64_FORMAT "%ld" int64 a = 20000001; int64 b = 40000005; int does_int64_work() { int64 c,d,e; char buf[100]; if (sizeof(int64) != 8) return 0; /* doesn't look like the right size */ /* we do perfunctory checks on multiply, divide, sprintf, sscanf */ c = a * b; sprintf(buf, INT64_FORMAT, c); if (strcmp(buf, "800000140000005") != 0) return 0; /* either multiply or sprintf is busted */ if (sscanf(buf, INT64_FORMAT, &d) != 1) return 0; if (d != c) return 0; e = d / b; if (e != a) return 0; return 1; } main() { exit(! does_int64_work()); } configure:3915: checking whether 'long long int' is 64 bits configure:3955: /l5/lang/SUNWspro/bin/cc -o conftest -Xa -v -D__sparc__ -D__sun__ -DDISABLE_COMPLEX_MACRO conftest.c -lgen -lcrypt -lnsl -lsocket -ldl -lm -ltermcap -lcurses 1>&5 "configure", line 3939: warning: implicitly declaring function to return int: strcmp() "configure", line 3951: warning: implicitly declaring function to return int: exit() "configure", line 3952: warning: Function has no return statement : main << End of snippet >> Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma
В списке pgsql-ports по дате отправления: